package top.infopub.mgr.fia.domain;


import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.StringUtils;
import org.springframework.format.annotation.DateTimeFormat;
import top.infopub.enums.fia.HandModeEnum;
import top.infopub.enums.fia.HandTypeEnum;

import java.math.BigDecimal;
import java.util.Date;


public class FundsHandDomain {
    /*pk*/
    private String id;
    /*项目编码*/
    private String proCode;
    /*上交归属项目*/
    private String proName;
    /*创建时间*/
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date addTime;
    /*上交金额*/
    private BigDecimal handAmount;
    /*上交类型*/
    private String handType;
    /*上交方式*/
    private String handMode;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getProCode() {
        return proCode;
    }

    public void setProCode(String proCode) {
        this.proCode = proCode;
    }

    public String getProName() {
        return proName;
    }

    public void setProName(String proName) {
        this.proName = proName;
    }


    public Date getAddTime() {
        return addTime;
    }


    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    public BigDecimal getHandAmount() {
        return handAmount;
    }


    public void setHandAmount(BigDecimal handAmount) {
        this.handAmount = handAmount;
    }

    public String getHandType() {
        return handType;
    }


    public void setHandType(String handType) {
        this.handType = handType;
        if (StringUtils.isNotBlank(handType)) {
            HandTypeEnum ppdt = HandTypeEnum.getByCode(handType);
            if (ppdt != null) {
                setHandType(ppdt.getName());
            }
        }
    }

    public String getHandMode() {
        return handMode;
    }

    public void setHandMode(String handMode) {
        this.handMode = handMode;
        if (StringUtils.isNotBlank(handMode)) {
            HandModeEnum ppdt = HandModeEnum.getByCode(handMode);
            if (ppdt != null) {
                setHandMode(ppdt.getName());
            }
        }
    }
}
